package com.spddr.pmos.jpa;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
/**
 * 合同计划实体类
 * created by wujie on 2017/4/12
 */
@Entity
@Table(name = "contract_plan")
public class ContractPlan  extends JpaCommonAttr implements Serializable {
	private static final long serialVersionUID = 1L;
	//组织机构id或者是深溪沟、瀑布沟电站的id
	private  Long  orgPlant;
	//电站
	private Plant plant;
	//时间
	private String month;
	//合同
	private Contract contract;
	//交易时间
	private TradeWay tradeTime;
	//交易方式
	private TradeWay tradeWay;
	//交易品种
	private TradeWay tradeVariety;
	//电量类型
	private TradeWay electricityType;
	//交易区域
	private TradeWay tradeArea;
	//电量
	private Double energy;
	//电价
	private Double price;
	//电费
	private Double fee;
	private String args;
	public String getArgs() {
		return args;
	}

	public void setArgs(String args) {
		this.args = args;
	}

	public ContractPlan() {}
	
	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "trade_time")
	//@JsonSerialize(using = cn.seqdata.jackson.ObjectSerializer.IdName.class)
	public TradeWay getTradeTime() {
		return tradeTime;
	}

	public void setTradeTime(TradeWay tradeTime) {
		this.tradeTime = tradeTime;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "trade_way")
	//@JsonSerialize(using = cn.seqdata.jackson.ObjectSerializer.IdName.class)
	public TradeWay getTradeWay() {
		return tradeWay;
	}

	public void setTradeWay(TradeWay tradeWay) {
		this.tradeWay = tradeWay;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "trade_variety")
	//@JsonSerialize(using = cn.seqdata.jackson.ObjectSerializer.IdName.class)
	public TradeWay getTradeVariety() {
		return tradeVariety;
	}

	public void setTradeVariety(TradeWay tradeVariety) {
		this.tradeVariety = tradeVariety;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "electricity_type")
	//@JsonSerialize(using = cn.seqdata.jackson.ObjectSerializer.IdName.class)
	public TradeWay getElectricityType() {
		return electricityType;
	}

	public void setElectricityType(TradeWay electricityType) {
		this.electricityType = electricityType;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "trade_area")
	//@JsonSerialize(using = cn.seqdata.jackson.ObjectSerializer.IdName.class)
	public TradeWay getTradeArea() {
		return tradeArea;
	}

	public void setTradeArea(TradeWay tradeArea) {
		this.tradeArea = tradeArea;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "contract_id")
	//@JsonSerialize(using = cn.seqdata.jackson.ObjectSerializer.IdName.class)
	public Contract getContract() {
		return contract;
	}

	public void setContract(Contract contract) {
		this.contract = contract;
	}

	@Column(name = "energy")
	public Double getEnergy() {
		return energy;
	}

	public void setEnergy(Double energy) {
		this.energy = energy;
	}

	@Column(name = "price")
	public Double getPrice() {
		return price;
	}

	public void setPrice(Double price) {
		this.price = price;
	}

	@Column(name = "fee")
	public Double getFee() {
		return fee;
	}

	public void setFee(Double fee) {
		this.fee = fee;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "plant")
	public Plant getPlant() {
		return plant;
	}

	public void setPlant(Plant palnt) {
		this.plant = palnt;
	}
	@Column(name = "month")
	public String getMonth() {
		return month;
	}

	public void setMonth(String month) {
		this.month = month;
	}
	@Column(name = " org_plant")
	public Long getOrgPlant() {
		return orgPlant;
	}

	public void setOrgPlant(Long orgPlant) {
		this.orgPlant = orgPlant;
	}

	
	
}
